@echo off
set sf="c:\netlog.log"
set sftmp="c:\netlog_tmp.log"
set ip=193.218.154.135
echo kazda z 5 komend moze chwile potrwac. Cierpliwosci
echo 1. Sprawdzanie polaczen
echo ================= NETSTAT -b ====================== > %sf%
call netstat -b >> %sf%
echo ================= NETSTAT -b ====================== >> %sf%
echo. >> %sf%
echo. >> %sf%
echo 2. Sprawdzanie pingu %ip%
echo ================= PING ====================== >> %sf%
call ping %ip% >> %sf%
echo ================= PING ====================== >> %sf%
echo. >> %sf%
echo. >> %sf%
echo 3. Sledzenie trasy do %ip%
echo ================= TRECERT ====================== >> %sf%
call tracert %ip% >> %sf%
echo ================= TRECERT ====================== >> %sf%
echo. >> %sf%
echo. >> %sf%
echo 4. Sledzenie uslug
echo ================= USLUGI ====================== >> %sf%
call wmic /output:%sftmp% SERVICE where (state="running") GET Name, PathName 
call type %sftmp% >> %sf%
del /q /f %sftmp%
echo ================= USLUGI ====================== >> %sf%
echo. >> %sf%
echo. >> %sf%
echo 5. Sledzenie procesow
echo ================= PROCESY ====================== >> %sf%
call WMIC /output:%sftmp% PROCESS get caption, CommandLine, Name,PageFileUsage,PeakVirtualSize,PeakWorkingSetSize
call type %sftmp% >> %sf%
del /q /f %sftmp%
echo ================= PROCESY ====================== >> %sf%
echo. >> %sf%
echo. >> %sf%
echo Koniec sprawdzania.
echo Wyniki masz w pliku %sf%
pause
